Skip to content

Conversation

@TomRitserveldt
Copy link
Member

This was always in the jwt specification, but was not enforced in the jwt python library until recently.
jpadilla/pyjwt#1005

disable verification of the sub field until we're sure new tokens are correct in ~4 months

This was always in the jwt specification, but was not enforced in the jwt python library until recently.
jpadilla/pyjwt#1005

disable verification of the sub field until we're sure new tokens are correct in ~4 months
src/delegate.py Outdated
Comment on lines 111 to 112
if any(',' in s for s in existing_sub if isinstance(s, str)):
return bad_request('', 'existing sub chain contains invalid comma')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

als existing_sub een string is gaat dit problemen geven denk ik
[s for s in "foo"" is ["f", "o", "o"] IIRC

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

klopt. ik kijk naar een fix

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

misschien iets als

if isinstance(existing_sub, str):
    existing_sub =  existing_sub.split()

boven de if any

src/delegate.py Outdated
'domains': list(domains),
'azp': refresh_token['azp'], # Authorized Party
'sub': refresh_token.get('sub', []) + [subject], # subject
'sub': ', '.join(existing_sub + [subject]), # sub must be string adhering to jwt spec: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ik zou , zonder spatie gebruiken, is iets eenvoudiger in de split

@TomRitserveldt TomRitserveldt force-pushed the feature/grant-subject-string branch from 23a369e to 89ceaef Compare July 23, 2025 09:31
@TomRitserveldt TomRitserveldt force-pushed the feature/grant-subject-string branch from f9323ea to 79b9a6e Compare July 23, 2025 11:13
@TomRitserveldt TomRitserveldt merged commit 9845546 into master Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants